﻿using RestSharp;
using Ymatou.API.Common;
using Ymatou.Evaluate.Buyer.Model.ApiModel.Response.Query;
using Ymatou.ServiceCenter;

namespace Ymatou.Evaluate.Buyer.Model.ApiModel.Request.Query
{
    /// <summary>
    /// 获取买家待评价订单总数
    /// </summary>
    [Resource("bevaluateq.iapi.ymatou.com", "api/GetPendingEvaluateCount", Method.GET, ParameterBuildType.UrlQueryString)]
    public class GetPendingEvaluateCountRequest : BaseRequestModel<GetPendingEvaluateCountResponse>
    {
        public override string ApiName
        {
            get { return "api/GetPendingEvaluateCount"; }
        }

        public override bool HttpGet
        {
            get { return true; }
        }

        /// <summary>
        /// 买家Id
        /// </summary>
        public int BuyerId { get; set; }

        public override void Validate()
        {
            const string errCode = "-1";
            if (BuyerId <= 0)
            {
                throw new BussniessException(errCode, "非法买家Id");
            }
            base.Validate();
        }
    }
}
